if PLATFORM_WIN32
no_undefined = -no-undefined
endif

INCLUDES =			\
	$(GTK_CFLAGS)

LDADDS =			\
	$(GTK_LIBS)

moduledir = $(libdir)/gtk-2.0/$(GTK_BINARY_VERSION)/immodules

module_LTLIBRARIES =		\
	im-burmese.la

im_burmese_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_burmese_la_SOURCES =	\
	gtkimcontextbur.c 	\
	gtkimcontextbur.h	\
	gtk-im-bur.c		\
	callbacks.c		\
	callbacks.h		

im_burmese_la_LIBADD = $(LDADDS)

# Running this if cross compiling or if DESTDIR is set is going to
# not work at all, so skip it.
install-data-hook:
	@if test -z "$(DESTDIR)" ; then \
	  echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
	  $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-2.0 ; \
	  echo "gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules" ; \
	  gtk-query-immodules-2.0 > $(DESTDIR)$(sysconfdir)/gtk-2.0/gtk.immodules ; \
	else \
	  echo "***" ; \
	  echo "*** Warning: gtk.immodules not built" ; \
	  echo "***" ; \
	  echo "*** Generate this file manually on host" ; \
	  echo "*** system using gtk-query-immodules-2.0" ; \
	  echo "***" ; \
        fi